// 这个文件是对webpack配置的一些补充
// 该文件做修改后必须重启服务
const Mock = require("mockjs")
let data = Mock.mock({
    "list|5":[{
      "img":"@image(375x100,@color)"
    }]
})
let data1 = Mock.mock({
    "list":[{
       "title":"男装",
       "children|5":[{
            "img":"@Image(100x100,@color)",
            "title":"@ctitle"
          }]
       }]
    
})
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true, 
  lintOnSave:false , // 关闭eslint
  devServer: {  // 拦截接口得，使用模拟得接口,配置接口这配置
    onBeforeSetupMiddleware({app}){
         app.get("/list",(req,res)=>{
              res.send(data1.list)
         })
    }
  }
})
